home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NOVA - For the NeXT Workstation
/
NOVA - For the NeXT Workstation.iso
/
Apps
/
AudioApps
/
Resound
/
SoundTable.h
< prev
next >
Wrap
Text File
|
1992-12-20
|
3KB
|
93 lines
/*
March 25, 1992
The Sound Table
This requires some explaining. The Sound Table is a true data type, which stores away (implemented in
several arrays) sounds, soundviews, windows, and other information, by some key. Accessing it generally works like this:
Look for this sound (or window or soundview)
Now give me the associated window (or soundview, or sound)
"Finding" sets the pointer to the current cluster of information (a sound, a soundview, a window, and
the booleans below), and "returning" returns information according to the current pointer...
Sound Table also stores the current position a new window will fill.
SOUNDTABLE IS ONLY TO BE USED BY THE FILE MANAGER. IF YOU NEED THE CURRENT SOUND, SOUNDVIEW, ETC.
DO NOT ACCESS IT DIRECTLY. ACCESS IT USING METHODS IN THE FILEMANAGER.
*/
#import <objc/Object.h>
#define MAX_NUMBER_OF_SOUNDS 256 // Yes, Yes, I know. The object is an array...
@interface SoundTable:Object
{
id SoundID [MAX_NUMBER_OF_SOUNDS]; // The Sound, by key number
id SoundViewID [MAX_NUMBER_OF_SOUNDS]; // Its associated SoundView
id WindowID [MAX_NUMBER_OF_SOUNDS]; // Its associated Window
BOOL SoundChanged [MAX_NUMBER_OF_SOUNDS]; // Whether the sound has changed
BOOL SoundUntitled [MAX_NUMBER_OF_SOUNDS]; // Whether the window is untitled
id String [MAX_NUMBER_OF_SOUNDS]; // The Filename
int StartPosX; // The first position for a window, x and y
int StartPosY;
int PosX; // The current position for a window, x and y
int PosY;
int CurrentNumber; // Number of windows/sounds open
int Current; // Pointer (key) to the current sound/window etc.
int WindowPosCount; // How much to offset the windows...
}
- init;
- (int) NewItem:ThisSound: // Returns 0 if unable
ThisSoundView: // otherwise returns sound number
ThisWindow:
(char *) ThisFileName:
(BOOL) ItsUntitled;
- Delete; //Deletes Current Sound
- (int) Total; //Total Number of Sounds
- SoundEdited; //Sets the Edited Flag to YES
- SoundReset; //Sets the Edited Flag to NO
- (BOOL) FindChangedSound; //Finds the next Edited Sound
- (BOOL) IsSoundChanged; //Returns Edited Flag
- (BOOL) FindSound: ThisSound; //All these return NO if unable
- (BOOL) FindWindow: ThisWindow;
- (BOOL) FindSoundView: ThisSoundView;
- (BOOL) Previous;
- (BOOL) Next;
- SetSound: ThisSound;
- SetWindow: ThisWindow;
- SetSoundView: ThisSoundView;
- SetFileName: (const char *) ThisFileName;
- ReturnSound;
- ReturnWindow;
- ReturnSoundView;
- (const char*) ReturnFileName;
- (BOOL) ReturnUntitled; //Returns whether or not the window file is untitled
/* for some bizaare reason I made the Sound Table also handle new window positions, so the
windows would cascade nicely. Don't ask... */
- NewWindowPos; // make current setting = a new settting
- (int) WindowPosX; // X and Y coordinates of the current setting
- (int) WindowPosY;
@end